<script setup>
import { ref } from 'vue'
import Register from './view/Register.vue'
import Login from './view/Login.vue'
import Lottery from './view/Lottery.vue'
import LotteryWins from './view/LotteryWins.vue'

const page = ref('login')
</script>

<template>
  <Login v-if="page === 'login'" @to-register="page = 'register'" @to-lottery="page = 'lottery'" @to-wins="page = 'wins'" />
  <Register v-else-if="page === 'register'" @to-login="page = 'login'" />
  <Lottery v-else-if="page === 'lottery'" @to-login="page = 'login'" @to-wins="page = 'wins'" />
  <LotteryWins v-else @to-lottery="page = 'lottery'" />
</template>